package com.ibeeking.found.auth.api.feign;

import com.ibeeking.found.auth.api.common.dto.LoginUserDTO;
import com.ibeeking.found.auth.api.common.query.AccountLoginQuery;
import com.ibeeking.found.auth.api.feign.fallback.GlobalLoginFallbackFactory;
import com.ibeeking.nematos.utils.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author ibeeking
 */
@FeignClient(name = "base-upms-g-server", contextId = "globalLoginClient", path = "/g", fallbackFactory = GlobalLoginFallbackFactory.class, decode404 = true)
public interface GlobalLoginClient {

    /**
     * 全局端登录
     *
     * @param query
     * @return
     */
    @PostMapping(value = "/user/feign/v1/queryAccountLogin")
    ResponseResult<LoginUserDTO> queryAccountLogin(@RequestBody AccountLoginQuery query);
}
